/**
 * Copyright (C), 2013-2019, 中商惠民科技有限公司
 * FileName: DynamicProxyHandler
 * FileName: DynamicProxyHandler
 * Author:   Eilen
 * Date:     2019/4/25 13:57
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 **/
package com.algorithm.basic;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * 〈describe〉<br> 
 * 〈〉
 *
 * @author Eilen
 * @create 2019/4/25
 * @since 1.0.0
 */
public class DynamicProxyHandler implements InvocationHandler {
    private Object proxyed;

    public DynamicProxyHandler(Object proxyed) {
        this.proxyed = proxyed;
    }

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("代理了");
        method.invoke(proxyed,args);
        return null;
    }
}
